<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE">
    <title>tcp日志管理</title>
    <script type="text/javascript" src="../../js/jquery.min.js"></script>
    <script type="text/javascript" src="../../js/jquery.pagination.js"></script>
    <script type="text/javascript" src="../../js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../../js/public.js"></script>
    <script type="text/javascript" src="../../js/alert.js"></script>
    <script type="text/javascript" src="../../js/jquery-ui/jquery-ui.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../../js/jquery-ui/jquery-ui.css">
    <link rel="stylesheet" type="text/css" href="../../css/bootstrap.css">
</head>
<body>
<div class="right_mainH4">
    <p>
        tcp日志管理
        <small>Control panel</small>
    </p>
</div>
<div>
    <form role="form" style="padding: 10px 0 10px 20px;">
        <span>查询</span>
        <select id="query" style="width: 90px;">
            <option value="请选择">-请选择-</option>
            <option value="mobile">终端手机号</option>
        </select>
        <input type="text" id="keywords" placeholder="Key" style="width:120px;">

        <button type="button" onclick="searchPage(1,10);" class="btn btn-success">查询</button>
    </form>
</div>

<table class="table table-bordered" id="datas">
    <tr>
        <td name="ids">ID</td>
        <td name="createDate">操作时间</td>
        <td name="mobile">终端手机号</td>
        <td name="msgid">消息ID</td>
        <td name="descs">备注</td>
        <td name="id" other="tcpLog">操作</td>
    </tr>
</table>
<div class="pager">
</div>

<!-- tcp日志信息 -->
<div id="tcpLogInfoDiv" style="display:none;" title="tcp日志查询">
    <iframe src="" style="width:100%;height: 100%" frameborder="no" marginwidth="0" marginheight="0"
            allowtransparency="yes"></iframe>
</div>

<script type="text/javascript">
    searchPage(1, 10);

    //分页查询
    function searchPage(pageNo, pageSize) {
        $.ajax({
            url: "../../tcpLog/find.ao",
            type: 'POST',
            data: {
                "pageNo": pageNo,
                "pageSize": pageSize,
                "query": $("#query").val(),
                "keywords": $("#keywords").val(),
            },
            beforeSend: ajaxstar,
            complete: ajaxend,
            cache: false,
            dataType: "json",
            success: function (data) {
                if (data["state"] == "success") {
                    insertTr(data, 0);
                } else {
                    sAlert(data["result"]);
                }
            }
        });
    }

    //tcp日志查询
    function look(id) {
        $("#tcpLogInfoDiv").find("iframe").attr("src", "logInfo.html?id=" + id);
        $("#tcpLogInfoDiv").dialog({
            title: "tcp日志查询",
            resizable: false,
            width: 750,
            height: 550,
            resizable: true,
            modal: true,
            buttons: {
                "关闭": function () {
                    $(this).dialog("close");
                }
            }
        });
    }

</script>
</body>
</html>